// ==================================================================================
// Shared Genomics Project MPI Codebase
// Version 1.0 30/04/2010
//
// (c) 2010 University of Manchester all rights reserved
//
// This file is distributed under the GNU General Public License, Version 2.  
// Please see the file COPYING.txt for more details
// ==================================================================================

#ifndef _GETOPT_H_
#define _GETOPT_H_

#ifdef __cplusplus
extern "C" {
#endif

/*!
\file
\ingroup	gio
\brief		Command Line Arguement Parsing
\details	
	Declarations for GNU getopt library for command-line argument parsing.<br>
*/

extern char *optarg;
extern int optind;
extern int opterr;
extern int optopt;

/*!
\brief Getopt() Structure, command-line options
*/
struct option
{
  char *name;
  int has_arg;
  int *flag;
  int val;
};

#define	no_argument		0
#define required_argument	1
#define optional_argument	2

int getopt (int argc, const char **argv, const char *optstring);
int getopt_long(int argc, const char **argv, const char *shortopts, const struct option *longopts, int *longind);

#ifdef __cplusplus
}
#endif

#endif // _GETOPT_H_ 
